package com.ws.client;

import java.rmi.RemoteException;
import java.util.HashMap;

import javax.xml.rpc.ServiceException;

import net.sf.json.JSONObject;

public class WSProxyUtils {
	
	public static HashMap<String, String> call(HashMap<String, String> map)
		    throws ServiceException, RemoteException
		  {
		    ProxyServiceLocator w = new ProxyServiceLocator();
		    Proxy s = w.getProxyPort();
		    String str = s.service(JSONObject.fromObject(map).toString());
		    JSONObject jsonObj = JSONObject.fromObject(str);
		    map = (HashMap)JSONObject.toBean(jsonObj, HashMap.class);
		    return map;
		  }

	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}
